#include<iostream>
#include<queue>
#include<cstring>
using namespace std;
typedef long long LL;
const int N = 2e5 + 10;
LL a[N];
int n;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		cin >> n;
		if (n == 1) {
			cout << "a" << endl;
			continue;
		}
		if (n == 2) {
			cout << "ab" << endl;
			continue;
		}
		int idx = 0;
		for (int i = 1; i <= n; i++) {
			if (n % i == 0)continue;
			else {
				idx = i;
				break;
			}
		}
		string s;
		int a = 0;
		for (int i = 0; i < n; i++) {
			char c = ('a' + a);
			a++;
			a %= idx;
			s += c;
		}
		cout << s << endl;
	}
	return 0;
}